<div fxFlexFill fxLayout="row" > <!-- (window:resize)="onResize()" -->
  <aside class="turbine-data-aside" [ngClass]="{'main-aside':active==1}">
  <!--   <app-turbine-tag-selector [farmLimiteCount]="6" [hasTag]="false"  [codeTags]="codeTags" [setTag]="'01'"
      (turbinesEmit)="onTurbinesEmit($event)">
    </app-turbine-tag-selector> -->
    <app-device-tag-selector   
        class="alarm-aside-selector"
        [farmCategory]="farmCategory"
        [deviceCategories]="deviceCategory"          
        [multipleFarm]="true"   
        [choiceDeviceCount]="deviceCountLimit"
        [multipleModel]="false"
        [includeTagSelector]="false"       
        (selectedDevicesChange)="onSelectedDevicesChange($event)">       
      </app-device-tag-selector>
  </aside>

  <section class="main" >
    <header>
      <div class="trend-main-header">
        <span (click)=onClickHeader(0) [ngClass]="{on:active==0}">
          风场
        </span>
        <span (click)=onClickHeader(1) [ngClass]="{on:active==1}">
          风机
        </span>
      </div>
     
      <div class="echartsTitle">
        <span class="wind"></span>风速m/s        
        <span class="power"></span> <span *ngIf="active==0">功率MW</span> <span *ngIf="active==1">功率kW</span>         
      </div>
      
       <div class="header">
        选择时间：
        <span>
          <p-calendar [locale]="en" [(ngModel)]="serchTime" ></p-calendar>
        </span>
        <span>
          <button class="button-trend" (click)="onSearch()">确定</button>
        </span>
      </div>
    </header>

    <div class="main-farm">
      <!--公司  -->
      <div [ngClass]="{'main-content':true, active:active==0}">
        <div class="company-line">
          <div class="company-chart">
            <app-wind-power-echart
              [name]="copmanyFarmsLoads?.companyName"
              [time]="copmanyFarmsLoads?.time"
              [yesterdayWindSpeedDatas] = "copmanyFarmsLoads?.meanWindSpeeds"
              [yesterdayPowerDatas] = "copmanyFarmsLoads?.powers"
              >
            </app-wind-power-echart> 
          </div>
        </div>
        <!--风场  -->
        <div class="farm-line">
          <div class="farm-chart" *ngFor="let load of limitedFarmsLoads">
            <app-wind-power-echart
              [name]="load.farmName"
              [time]="load.time"
              [yesterdayWindSpeedDatas] = "load.meanWindSpeeds"
              [yesterdayPowerDatas] = "load.powers"
              >
            </app-wind-power-echart>
          </div>
        </div>
      </div>
      
      <!--风机  -->
      <div class="main-content" [ngClass]="{'main-content':true, active:active==1}">
        <div class="farm-line">
          <div class="farm-chart" *ngFor="let load of limitedTurbineLoads">
            <app-wind-power-echart
              [name]="load.deviceName"
              [time]="load.time"
              [yesterdayWindSpeedDatas] = "load.meanWindSpeeds"
              [yesterdayPowerDatas] = "load.powers"
              >
            </app-wind-power-echart>
          </div>
        </div>
      </div>
    </div>
   </section> 
</div>
